/**
 * Created with JetBrains PhpStorm.
 * User: ishowshao
 * Date: 12-8-21
 * Time: 下午8:01
 */
Ext.define('ExtFrame.view.Menu', {
    requires: [
        'ExtFrame.model.menu.Page'
    ],
    extend: 'Ext.tree.Panel',
    alias: ['widget.frame.menu'], //注意这里widget.menu 会覆盖系统自带的Ext.menu.Menu widget是系统xtype命名空间，使用时要小心
    hideHeaders: true,
    rootVisible: false,
    title: '系统菜单',
    width: 200,
    store:  {
        xtype: 'store.tree', //store 的 xtype 这样用
        model: 'ExtFrame.model.menu.Page',
        root: {
            name: 'Menu',
            expanded: true
        }
    },
    columns: [
        { xtype: 'treecolumn', dataIndex: 'name', flex: 1 }
    ]
});